package demo.mq.rocket.vo;

import com.alibaba.fastjson.JSON;
import demo.java.time.DateTimeDemo;

import java.time.LocalDateTime;
import java.util.List;

public class GroupStatInfo {
    /** 组 */
    private String group;
    /** 主题 */
    private String topic;
    /** 总延迟 */
    private Integer diffTotal;
    /** 最后消费时间 */
    private Long lastTimestamp;
    /***/
    private List<QueueStatInfo> queueStatInfoList;

    public LocalDateTime getLastTime() {
        if (this.lastTimestamp == null) {
            return null;
        }
        return DateTimeDemo.toLocalDateTime(this.lastTimestamp);
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public Integer getDiffTotal() {
        return diffTotal;
    }

    public void setDiffTotal(Integer diffTotal) {
        this.diffTotal = diffTotal;
    }

    public Long getLastTimestamp() {
        return lastTimestamp;
    }

    public void setLastTimestamp(Long lastTimestamp) {
        this.lastTimestamp = lastTimestamp;
    }

    public List<QueueStatInfo> getQueueStatInfoList() {
        return queueStatInfoList;
    }

    public void setQueueStatInfoList(List<QueueStatInfo> queueStatInfoList) {
        this.queueStatInfoList = queueStatInfoList;
    }

}
